$('#logout-btn').on('click',function(){
    layer.confirm('确定退出？', {icon: 3, title:'提示'}, function(index){
        //do something
        // 如果点击确定会执行这个函数

        // 1.删除token
        localStorage.removeItem('token')

        // 2.页面跳转
        location.href = './login.html'
        layer.close(index)
        
        
    })
})